{"text_format":"1","workbook":"xlsx","n_sheets":3,"sheets":["Úvod","Teorie","Word to Pdf"],"not_rendered":{"charts":0,"images":4,"macros":1,"external_links":1,"defined_names":2,"comments":0,"pivot_tables":0},"unopened":[],"bounds":{"document_bytes":16777216,"sheet_cells":100000,"rows_first":2000,"rows_last":500,"rows_between":2000,"halvings":0,"cell_chars":16384,"cell_head_chars":4096},"cells_cut":0,"cells_raw":0,"read":"whole","date_system":"1900"}

{"sheet":"Úvod","index":0,"n_rows":18,"n_cols":8,"rows_kept":18,"cut":false,"hidden":false,"merged":[[17,1,17,11],[1,2,1,9],[10,2,11,6],[13,3,14,6],[14,7,14,9]]}
[]
[null,null,"Jak na Excel "]
[]
[]
[null,null,null,"Obsah cvičení"]
[null,null,null,null,"Excel do Word  - vypnit šablonu a uložit jako *.pdf"]
[]
[]
[]
[]
[null,null,"Pavel Lasák"]
[]
[]
[null,null,null,"Lektor, expert na Microsoft Excel, držitel prestižního ocenění Microsoftu MVP v České republice"]
[null,null,null,null,null,null,null,5002722]
[]
[]
[null,"Copyright, Pavel Lasák 2018"]

{"sheet":"Teorie","index":1,"n_rows":4,"n_cols":2,"rows_kept":4,"cut":false,"hidden":false,"merged":[[0,0,0,8]]}
["Vložení knihovny"]
[]
[null,"VBA"]
[null,"Tools > References…"]

{"sheet":"Word to Pdf","index":2,"n_rows":44,"n_cols":2,"rows_kept":44,"cut":false,"hidden":false,"merged":[]}
[]
[]
[]
[]
[]
[]
[null,"' -------------------------------------------------"]
[null,"' - Vyplnování šablony ve Word a ulození jako pdf"]
[null,"' -   Pavel Lasák, 2018, Verze 01 testovací"]
[null,"' -         využitím Stackoverflow"]
[null,"' -------------------------------------------------"]
[]
[null,"   Dim objWord"]
[null,"   Dim objDoc"]
[null,"   Dim objSelection"]
[null," "]
[null,"   Set objWord = CreateObject(\"Word.Application\")"]
[null,"   ' v daném adresáři k dispozici"]
[null,"   ' musí mít patričné Controls, Ovládací prvky"]
[null,"   Set objDoc = objWord.Documents.Open(\"D:\\test\\Vyplnovani.doc\")"]
[null,"   objWord.Visible = True"]
[null,"   Set objSelection = objWord.Selection"]
[null,"   "]
[null,"   'ContentControls - musí být k dispozici ve Word"]
[null,"   '                  dodržuje pořadí jak jsou za sebou"]
[null,"   objDoc.ContentControls(1).Range.Text = \"pokus1\""]
[null,"   objDoc.ContentControls(2).Range.Text = \"pokus2\""]
[null,"   objDoc.ContentControls(3).Range.Text = \"pokus3\""]
[null,"   "]
[null,"   'ContentControls - musí být k dispozici ve Word s příslušným Tagem"]
[null,"   '                  nezaleží na pořadí"]
[null,"   objDoc.SelectContentControlsByTag(\"Name1\").Item(1).Range.Text = \"Name1\""]
[null,"   objDoc.SelectContentControlsByTag(\"Name2\").Item(1).Range.Text = \"Name2\""]
[null,"   objDoc.SelectContentControlsByTag(\"Name3\").Item(1).Range.Text = \"Name3\""]
[null,"   "]
[null,"   ' uloží jako *.pdf"]
[null,"   objDoc.SaveAs2 \"D:\\test\\Vyplneno_01.pdf\", 17"]
[null,"   ''  možno uložit i jako doc"]
[null,"   ''  objDoc.SaveAs (\"D:\\test\\Ulozeni.doc\")"]
[null,"   "]
[null,"   ' zavří a ukončit"]
[null,"   objDoc.Close"]
[null,"   objWord.Quit"]
[null,"   Set objWord = Nothing"]